package com.hdax.dm.api.scheduler.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hdax.dm.api.scheduler.SchedulerSeatPriceControllerApi;
import com.hdax.dm.entity.scheduler.SchedulerSeatPrice;
import com.hdax.dm.service.SchedulerSeatPricePService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SchedulerSeatPricePController implements SchedulerSeatPriceControllerApi {

    @Autowired
    private SchedulerSeatPricePService schedulerSeatPricePService;

    @Override
    public List<SchedulerSeatPrice> getPrice(Long scheduleId) {
        QueryWrapper<SchedulerSeatPrice> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("scheduleId",scheduleId);
        return schedulerSeatPricePService.list(queryWrapper);
    }
}
